/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Conexao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Marcos
 */
public class ConexaoBanco {
    
     public static Connection getConexao() throws SQLException {
        try {
            Class.forName("org.firebirdsql.jdbc.FBDriver");//Inicializa o Driver
            return DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:C:\\Users\\Firebird\\Google Drive\\Banco\\firebird.fdb", "SYSDBA", "masterkey");//Estsbelece a conexão
           // return DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:C:\\Temp\\Banco\\BANCOBIGUA.FDB", "SYSDBA", "masterkey");//Estsbelece a conexão
          
        } catch (ClassNotFoundException e) {
            throw new SQLException(e.getMessage());// se houve algum erro, uma exceção é gerada para informar o erro

        }

    }
    
}
